/* eslint-disable prettier/prettier */
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

export type UserRoleType = "admin" | "editor" | "ghost"

@Entity()
export class OssEntity {
    // rimary :主键  Generated：自增
    @PrimaryGeneratedColumn()
    id: number;
    // Column ：列
    @Column()
    firstName: string;

    @Column({
        type: "enum",
        enum: ["admin", "editor", "ghost"],
        default: "ghost"
    })
    role?: UserRoleType
}
